package com.chis.xstream;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;

public class Test {
    public static void main(String[] args) {
        try {

//            XStream xStream = new XStream(new DomDriver());
//            xStream.alias("VTTSBasic", GjData1019.class);
//            xStream.aliasField("dataset",GjData1019.class,"mainList");
//            xStream.alias("data", GjData1019Main.class);
//            xStream.aliasField("BASQXQS",GjData1019Main.class,"subList");
//            xStream.alias("BASQXQ", GjData1019Sub.class);
//            GjData1019 gjData1019 = (GjData1019)xStream.fromXML(readString2());
//            StringBuffer stringBuffer = new StringBuffer("insert into TB_JXCGJ_VACCINE(" +
//                    "            GJYPBSM," +
//                    "            YPTYMC," +
//                    "            YPYWMC," +
//                    "            YPSPMC," +
//                    "            YPBWM," +
//                    "            JX," +
//                    "            ZJGG," +
//                    "            BZGG," +
//                    "            BZZHB," +
//                    "            BZZHBDW," +
//                    "            YMYXQ," +
//                    "            JKYPZCZH," +
//                    "            JKYPZCZYXQ," +
//                    "            PZRQ," +
//                    "            JKYPPJH," +
//                    "            JKYPPJYXQ," +
//                    "            YPPZWH," +
//                    "            YPPZWHYXQ," +
//                    "            YWSYCJL," +
//                    "            YWSYJLDW," +
//                    "            ZXXSBZDYKYRFS," +
//                    "            GSMCZW," +
//                    "            GSMCYW," +
//                    "            GSDZZW," +
//                    "            GSDZYW," +
//                    "            GSGJHDQZW," +
//                    "            GSGJHDQEN," +
//                    "            SCCMCZW," +
//                    "            SCCMCYW," +
//                    "            SCCDZZW," +
//                    "            SCCDZEN," +
//                    "            SCCGJHDQZW," +
//                    "            SCCGJHDQEN," +
//                    "            FBZCMC," +
//                    "            TYSHXYDMFBZC," +
//                    "            FBZCDZ," +
//                    "            SFGJMYGHYM," +
//                    "            SCZT," +
//                    "            TYSHXYDMDLQY," +
//                    "            DLQYMC," +
//                    "            SCQYMC," +
//                    "            TYSHXYDMSCQY," +
//                    "            YMSSXKCYRMC," +
//                    "            TYSHXYDMYMSSXKCYR," +
//                    "            ZJHYMSSXKCYR," +
//                    "            ZJLX," +
//                    "            BZGGBS)" +
//                    "        values" +
//                    " ");
//            for(GjData1019Main t : gjData1019.getMainList()){
//                stringBuffer.append("(");
//                stringBuffer.append("'").append(t.getGJYPBSM()).append("',");
//                stringBuffer.append("'").append(t.getYPTYMC()).append("',");
//                stringBuffer.append("'").append(t.getYPYWMC()).append("',");
//                stringBuffer.append("'").append(t.getYPSPMC()).append("',");
//                stringBuffer.append("'").append(t.getYPBWM()).append("',");
//                stringBuffer.append("'").append(t.getJX()).append("',");
//                stringBuffer.append("'").append(t.getZJGG()).append("',");
//                stringBuffer.append("'").append(t.getBZGG()).append("',");
//                stringBuffer.append("'").append(t.getBZZHB()).append("',");
//                stringBuffer.append("'").append(t.getBZZHBDW()).append("',");
//                stringBuffer.append("'").append(t.getYMYXQ()).append("',");
//                stringBuffer.append("'").append(t.getJKYPZCZH()).append("',");
//                stringBuffer.append("'").append(t.getJKYPZCZYXQ()).append("',");
//                stringBuffer.append("'").append(t.getPZRQ()).append("',");
//                stringBuffer.append("'").append(t.getJKYPPJH()).append("',");
//                stringBuffer.append("'").append(t.getJKYPPJYXQ()).append("',");
//                stringBuffer.append("'").append(t.getYPPZWH()).append("',");
//                stringBuffer.append("'").append(t.getYPPZWHYXQ()).append("',");
//                stringBuffer.append("'").append(t.getYWSYCJL()).append("',");
//                stringBuffer.append("'").append(t.getYWSYJLDW()).append("',");
//                stringBuffer.append("'").append(t.getZXXSBZDYKYRFS()).append("',");
//                stringBuffer.append("'").append(t.getGSMCZW()).append("',");
//                stringBuffer.append("'").append(t.getGSMCYW()).append("',");
//                stringBuffer.append("'").append(t.getGSDZZW()).append("',");
//                stringBuffer.append("'").append(t.getGSDZYW()).append("',");
//                stringBuffer.append("'").append(t.getGSGJHDQZW()).append("',");
//                stringBuffer.append("'").append(t.getGSGJHDQEN()).append("',");
//                stringBuffer.append("'").append(t.getSCCMCZW()).append("',");
//                stringBuffer.append("'").append(t.getSCCMCYW()).append("',");
//                stringBuffer.append("'").append(t.getSCCDZZW()).append("',");
//                stringBuffer.append("'").append(t.getSCCDZEN()).append("',");
//                stringBuffer.append("'").append(t.getSCCGJHDQZW()).append("',");
//                stringBuffer.append("'").append(t.getSCCGJHDQEN()).append("',");
//                stringBuffer.append("'").append(t.getFBZCMC()).append("',");
//
//                stringBuffer.append("'").append(t.getTYSHXYDMFBZC()).append("',");
//                stringBuffer.append("'").append(t.getFBZCDZ()).append("',");
//                stringBuffer.append("'").append(t.getSFGJMYGHYM()).append("',");
//                stringBuffer.append("'").append(t.getSCZT()).append("',");
//                stringBuffer.append("'").append(t.getTYSHXYDMDLQY()).append("',");
//                stringBuffer.append("'").append(t.getDLQYMC()).append("',");
//                stringBuffer.append("'").append(t.getSCQYMC()).append("',");
//                stringBuffer.append("'").append(t.getTYSHXYDMSCQY()).append("',");
//                stringBuffer.append("'").append(t.getYMSSXKCYRMC()).append("',");
//                stringBuffer.append("'").append(t.getTYSHXYDMYMSSXKCYR()).append("',");
//                stringBuffer.append("'").append(t.getZJHYMSSXKCYR()).append("',");
//                stringBuffer.append("'").append(t.getZJLX()).append("',");
//                stringBuffer.append("'").append(t.getBZGGBS()).append("'");
//                stringBuffer.append("),\n");
//            }
//            System.out.println(stringBuffer.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
    private static String readString2()
    {
        StringBuffer str=new StringBuffer("");
        File file=new File("C:\\Users\\wlj\\Desktop\\1597514409402.xml");
        try {
            FileReader fr=new FileReader(file);
            int ch = 0;
            while((ch = fr.read())!=-1 )
            {
                str.append((char)ch);
            }
            fr.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            System.out.println("File reader出错");
        }
        return str.toString();
    }
}
